<div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="panel-body" style="padding: 15px 0;">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="/user/list">用户列表</a></li>
                    <li><a href="/user/add">添加用户</a></li>
                </ul>
            </div>
            <div class="panel-body">
                <div class="row">
                    <form>
                        <div class="col-md-3 col-lg-offset-9">
                            <div class="input-group">
                                <input class="form-control" type="text" value="" placeholder="用户名/user_id" name="keyword">
                                  <span class="input-group-btn">
                                    <button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i></button>
                                  </span>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="table-responsive">
                    <table class="table table-bordered">
                        <thead>
                        <tr>
                            <th class="w8p">id</th>
                            <th class="w18p">用户名</th>
                            <th class="w18p">邮箱</th>
                            <th class="w13p">手机</th>
                            <th class="w15p">创建时间</th>
                            <th class="w8p">状态</th>
                            <th class="w15p">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {{ range $user := .users }}
                        <tr>
                            <td class="center">{{$user.Id}}</td>
                            <td>{{$user.Name}}</td>
                            <td>{{$user.Email}}</td>
                            <td class="center">{{$user.Mobile}}</td>
                            <td class="center">{{dateFormat $user.CreateTime "Y-m-d H:i:s" }}</td>
                            <td class="center">{{if eq $user.IsDelete 0}} 正常 {{else}} 屏蔽 {{end}}</td>
                            <td class="center">
                                <a name="edit" data-link="/user/edit?user_id={{$user.Id}}"><i class="glyphicon glyphicon-pencil"> </i>修改</a>
                                {{if eq $user.IsDelete 0}}
                                <a name="remove" onclick='Common.confirm("确认要屏蔽吗?", "/user/remove?user_id={{$user.Id}}")'><i class="glyphicon glyphicon-remove"></i>屏蔽</a>
                                {{else}}
                                <a name="review" onclick='Common.confirm("确定要恢复吗?", "/user/review?user_id={{$user.Id}}")' data-link="#" ><i class="glyphicon glyphicon-ok"> </i>恢复</a>
                                {{end}}
                            </td>
                        </tr>
                        {{end}}
                        </tbody>
                    </table>
                </div>
                <div class="panel-footer"></div>
            </div>
        </div>
    </div>
</div>
<script src="/static/js/modules/user.js"></script>
<script type="text/javascript">
    User.bindFancyBox();
</script>